﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RSALicCore
{
    /// <summary>
    /// 授权校验器
    /// </summary>
    public class LicVertifyer
    {
        /// <summary>
        /// 使用指定的公钥，校验指定的授权
        /// </summary>
        /// <param name="pubKey"></param>
        /// <param name="lic"></param>
        /// <returns></returns>
        public static bool Vertify(string pubKey, string lic)
        {
            var hash = HardwareInfoReader.Read();
            return new PubLicManager(pubKey).VertifyLic(lic, hash);
        }
    }
}
